/* 
 * Copyright [2018] [Alex/libo(liboms@hotmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.aop.base;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

import com.hyts.aop.annotation.Before;
import com.hyts.aop.annotation.Pointcut;
import com.hyts.aop.error.AopException;
import com.hyts.aop.handler.base.AfterMethod;
import com.hyts.aop.handler.base.BeforeMethod;
import com.hyts.aop.handler.base.RoundMethod;
import com.hyts.aop.handler.base.ValidateMethod;

/** 
 * @title AopHandler.java  
 * @package com.hyts.aop.handler  
 * @author libo/Alex
 * @email liboms@hotmail.com/liboware@163.com  
 * @date 2018年4月24日 
 * @version V1.0 
 */
public abstract class BaseAopHandler  {

	/**
	 * <p>代理操作的原生对象</p> 
	 * @fieldName proxyRealObject
	 * @fieldType Object
	 */ 
	private Object proxyRealObject;
	
	/**  
	 * <p>{字段的描述}</p> 
	 * @fieldName aopWeaveObject
	 * @fieldType Object
	 */ 
	protected Object[] aopWeaveObject;
	
	/**  
	 * @constructor：BaseAopHandler  
	 * @param proxyRealObject  
	 */ 
	public BaseAopHandler(Object proxyRealObject) {
		super();
		this.proxyRealObject = proxyRealObject;
	}
	
	/**  
	 * @name proxyRealObject's getter method
	 * @return proxyRealObject
	 */
	public Object getProxyRealObject() {
		return proxyRealObject;
	}
	
	/**  
     * @param obj
     * @exception
     */ 
    public void settingsAopWeaveObj(Object... obj) {
        this.aopWeaveObject = obj;
    }
    
	public abstract <T> T build(T clazz) throws AopException;
	
	public abstract Object build() throws AopException;

}
